<%--
  Created by IntelliJ IDEA.
  User: mayuanbao
  Date: 2018-11-26
  Time: 9:53
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>hello</title>
    <script src="static/jquery/jquery-3.3.1.js"></script>
</head>
<body>
<form action="${pageContext.request.contextPath}/up/upload.html" method="post" enctype="multipart/form-data">
    file:<input type="file" name="f1"/><br>
    desc:<input type="text" name="desc"/><br>
    <input type="submit" value="submit"><br>
    <button type="button">点我</button>
</form>

<script>
    $("button").click(function () {
        $.post("/springmvc/one/json.html", {name: "张三", age: 18}, function (res) {
            if (res.status > 0) {
                console.log(res.status + ">>>>");
                console.log("res:" + res + ",res.age：" + res.user.age + ",res.name:" + res.user.name);
            }
        }, "json");
    });
</script>
</body>
</html>
